<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>输入框布局</title>
    <style>
        .input-con {
            width: 300px;
            height: 44px;
            display: flex;
            border: solid 1px gray;
        }
        .name {
            flex: 0 0 3em;
            line-height: 44px;
            background-color: lightgray;
            text-align: center;
        }
        .inppp {
            flex: 1 0 auto;
        }
        input {
            border: none;
            outline: none;
        }
    </style>
</head>
<body>
    <div class="input-con">
        <span class="name">姓名:</span>
        <input type="text" class="inppp" placeholder="please enter your name">
    </div>
</body>
</html>